package com.pen.interfece.mapper;

import com.github.pagehelper.Page;
import com.pen.interfece.pojo.dto.DisciplinaryPageQueryDTO;
import com.pen.interfece.pojo.entity.Disciplinary;
import com.pen.interfece.pojo.entity.Maintenance;
import org.apache.ibatis.annotations.*;

import java.util.List;

@Mapper
public interface DisciplinaryMapper {
    @Select("select * from disciplinary where student_id = #{studentId}")
    Page<Disciplinary> pageQuery(DisciplinaryPageQueryDTO disciplinaryPageQueryDTO);


    void save(Disciplinary disciplinary);
    @Delete("delete from disciplinary where id = #{id}")
    void deleteById(Long id);

    void update(Disciplinary disciplinary);
    @Select("select * from disciplinary where id = #{id}")
    Disciplinary getById(Long id);

    @Select("select * from maintenance where student_id = #{studentId}")
    List<Maintenance> pageMt(int studentId);
}

